<!--
 * @Author: your name
 * @Date: 2021-08-19 15:25:06
 * @LastEditTime: 2022-03-31 10:31:01
 * @LastEditors: wei_jt@ecidi.com
 * @Description: 契约锁
 * @FilePath: \central-system\src\components\PdfSignature\index.vue
-->
<template>
  <fks-dialog
    :visible="visible"
    :close-on-click-modal="false"
    :modal="true"
    :append-to-body="true"
    @close="close"
  >
    <iframe id="ifr" ref="iframe" class="page" name="iframes" :src="src" />
  </fks-dialog>
</template>
<script>
// import qs from 'qs'
// import { getAbsoluteUrl } from '@/utils/util.js'
export default {
  name: 'PdfSignature',
  props: {},
  data() {
    return {
      visible: false,
      src: ''
    }
  },

  watch: {},
  methods: {
    getCaption(obj, str) {
      let index = obj.lastIndexOf(str)
      obj = obj.substring(index + 1, obj.length)
      return obj
    },
    signIframe(src) {
      // let params = this.getCaption(src, '?')
      // getAbsoluteUrl(`${this.VUE_APP__CONTRACTLOCK_API}?${params}`)
      this.visible = true
      this.src = src
    },
    close() {
      this.visible = false
    }
  }
}
</script>

<style lang="scss" scoped>
.page {
  display: flex;
  width: 100%;
  height: 800px;
  overflow: auto;
}

::v-deep .fks-dialog__body {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

::v-deep .fks-dialog .fks-dialog__header {
  height: 57px !important;
}

::v-deep .fks-dialog__footer {
  padding-top: 12px;
  padding-bottom: 12px;
}

body::-webkit-scrollbar {
  display: none;
}
</style>
